package com.example.lib_personal;

import android.content.Context;
import android.content.Intent;

import com.drouter.api.action.IRouterAction;
import com.drouter.api.result.RouterResult;
import com.drouter.base.ThreadMode;
import com.drouter.base.annotation.Action;

import java.util.Map;

/**
 * Created by hcDarren on 2018/1/28.
 */
@Action(path = "libpersonal/login",threadMode = ThreadMode.MAIN,extraProcess = true)
public class LoginAction implements IRouterAction{

    @Override
    public RouterResult invokeAction(Context context, Map<String, Object> requestData) {
        // 跳转到登录页面。
        Intent intent = new Intent(context, LoginActivity.class);
        context.startActivity(intent);
        return new RouterResult.Builder().success().object("100").build();
    }
}
